﻿@model  DataMongo.Entities.UserCompanyInfo

@using (Html.BeginForm("UserProfileCompanyInfo", "Profile", FormMethod.Post, new {@class = "form-horizontal"}))
{
    @Html.HiddenFor(x=>x.UserCompanyInfoId)
     <h5 style="text-align: center">
                                            Company Information
                                            <span style="padding-left: 12px">
                                                <input type="submit" value="save" class="btn btn-blue btn-mini " />
                                            </span>
                                        </h5>
    <div class="control-group">
        <label for="textfield" class="control-label">Company Name</label>
        <div class="controls">
            @Html.TextBoxFor(x => x.CompanyName, new {@class = "input-medium", @placeholder = "Text input"})
        </div>
    </div>
    <div class="control-group">
        <label for="textfield" class="control-label">Division</label>
        <div class="controls">
            @Html.TextBoxFor(x => x.CompanyDivision, new {@class = "input-medium", @placeholder = "Text input"})
        </div>
    </div>
    <div class="control-group">
        <label for="textfield" class="control-label">Start Date</label>
        <div class="controls">
            <select id="CompanyStartDate" name="CompanyStartDate" class="input-medium">
                @foreach (var item in Model.YearList)
                {
                    <option value="@item">@item</option>

                }


            </select>
           
        </div>
    </div>
    <div class="control-group">
        <label for="textfield" class="control-label">End Date</label>
        <div class="controls">
            <select id="CompanyEndDate" name="CompanyEndDate" class="input-medium">
                @foreach (var item in Model.YearList.OrderByDescending(x => x))
                {
                    <option value="@item">
                        @if (item == DateTime.UtcNow.Year)
                        {
                            <text>Present</text>
                        }
                        else
                        {
                            @item
                        }
                </option>

                }


            </select>

        </div>
    </div>
     <div class="control-group">
        <label for="textfield" class="control-label">Description</label>
        <div class="controls">
            @Html.TextAreaFor(x => x.Description, new {@class = "input-medium", @placeholder = "Description"})
        </div>
    </div>
}